<?php /* Smarty version Smarty-3.1.19, created on 2017-11-16 13:52:06
         compiled from "/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/classes/index.html" */ ?>
<?php /*%%SmartyHeaderCode:8307312705a02ba4916e4e4-65399272%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '46dcfc18f84a867665eb9a197a624b4addd4705c' => 
    array (
      0 => '/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/classes/index.html',
      1 => 1510811499,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '8307312705a02ba4916e4e4-65399272',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5a02ba491a6165_89610875',
  'variables' => 
  array (
    'list' => 0,
    'v' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5a02ba491a6165_89610875')) {function content_5a02ba491a6165_89610875($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
  



  <div class="main-content">

    <div class="page-content">

      <div class="page-content-area" style="opacity: 0.8;"> <br>

        <div class="page-header">

          <h1> 班级管理 <small><i class="ace-icon fa fa-angle-double-right"></i> 班级列表 </small> </h1>

        </div>

        <div class="row">

          <div class="col-xs-12">

             <form method="post" class="form-horizontal" role="form" id="submitform" onsubmit="return false">

              <table class="table table-bordered table-hover">

                <thead>

                  <tr>

                    <th>ID</th>

                    <th>排序</th>

                    <th>名称</th>

                    <th>学生</th>

                    <th>老师</th>
                    <th>开始时间</th>
                    <th>结束时间</th>

                    <th>操作</th>

                  </tr>

                </thead>

                <tbody>

                <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_fromtemp = $_smarty_tpl->tpl_vars['list']->value['data']; $_from = $_smarty_tpl->tpl_vars['list']->value['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if($_fromtemp)foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>

                  <tr>

                    <td><input type="checkbox" name="id[]" value="<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
"/>

                      <?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
</td>

                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['score'];?>
</td>

                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['classes'];?>
</td>

                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['stnum'];?>
</td>

                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['_tid'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['start'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['end'];?>
</td>

                    <td><a href="<?php echo siteurl('con=admin/classes/edit');?>
&id=<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
">编辑</a></td>

                </tr>

                <?php } ?>

                <tr>

                    <td colspan="7"><input type="checkbox" onclick="var ck = this.checked;$('input[name=&quot;id[]&quot;]').each(function(){ this.checked = ck });">

                      <a class="btn btn-default btn-delete">删除</a>

                      <a class="btn btn-success" href="<?php echo siteurl('con=admin/classes/edit');?>
">+ 新增班级</a></td>

                  </tr>

                </tbody>

              </table>

              <table style="width:100%;" class="listpage">

                <tr>

                  <td><?php echo showpage($_smarty_tpl->tpl_vars['list']->value['page']);?>
</td>

                </tr>

              </table>

             </form>

          </div>

        </div>

    </div>

  </div>

  

<script>

$(function(){

	$('.btn-delete').click(function(){

		var ckvals = $.selectCK('input[name="id[]"]');

		if(!ckvals){

			tooltipbox.show('请选择要操作的数据');

			return false;

		}

		tooltipbox.confirm('确定永久删除选中的数据？', function(data){

			tooltipbox.show('正在执行操作...');

			$.post('<?php echo siteurl("con=admin/classes/delete");?>
', data, function(res){

				if(res.code == 1){

					location.reload();

				}

				tooltipbox.show(res.msg);

			}, 'json').error(function(){

				tooltipbox.show('数据或网络错误');

			});

		}, false, { 'ids': ckvals });

	});

});

</script>  

<?php echo $_smarty_tpl->getSubTemplate ('public/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
  <?php }} ?>
